<?php

function php_logit($val, $logFileName = "logging-php.log")
{
    if($logfile = fopen($logFileName, "a")) { 
        fwrite($logfile, "$val\n"); 
        fclose($logfile); 
    } 
}

function php_dielog($val)
{
    logit($val);
    die($val);
}

function php_logclear($logFileName = "logging-php.log")
{
    unlink($logFileName); 
}

?>
